﻿@model Dictionary<int, Lion.WeiXin.Core.Models.Order_DetailsModel>
@{
    Layout = "~/Views/Shared/_AppLayout.cshtml";
    Dictionary<int, Lion.WeiXin.Core.Models.Order_DetailsModel> list = Model as Dictionary<int, Lion.WeiXin.Core.Models.Order_DetailsModel>;    
}
@section ChildPageJs {
    <script src="/Scripts/App_Scripts/Order.js" type="text/javascript"></script>
}
<form id="fmSave" class="am-form">
    <ol id="olOrder" data-role="listview" data-inset="true" data-split-icon="delete" data-split-theme="d">
        @if (list.Count == 0)
        { 
            <li><a href="#">
                <h2>购物车是空的</h2>
            </a></li>
        }
        else
        {        
            <li data-role="list-divider">
                <h2>&nbsp;&nbsp;&nbsp;&nbsp;总价: <span id="OrderTotal">0</span> 元</h2>
            </li>
            foreach (Lion.WeiXin.Core.Models.Order_DetailsModel item in list.Values)
            {
            <li>
                <input type="hidden" id="AID_@item.Pro_ID" name="AID_@item.Pro_ID" value="@item.Pro_ID"/>
                <a href="#">
                    <img src="@item.Image" />
                    <p>
                        名称：@item.ProductName &nbsp;&nbsp;&nbsp;&nbsp;价格：<span id="pPrice">@item.Price</span>
                        &nbsp;&nbsp;&nbsp;&nbsp; <span>数量：<input type="text" id="Quantity" name="Quantity_@item.Pro_ID" data-role="none" onchange="Quantity_onchange(this)"  value="@item.Quantity" /></span>
                        &nbsp;&nbsp;&nbsp;&nbsp;合计：<span id="total">@(item.Price * item.Quantity)</span>
                    </p>
                </a>
                @* <a href="#purchase" id="btnBuy" data-rel="popup" data-position-to="window" data-transition="pop">删除</a>*@
                <a href="#" id="btnDel" onclick="btnDel_click(this)">删除</a>
            </li> 
            }
        }
    </ol>
  
    <div data-role="fieldcontain" data-mini="true">
            <label for="Code" >会员卡号：</label>
            <input type="text" id="Code" name="Code" placeholder="填写会员卡卡号" />
        </div>
    <div data-role="fieldcontain">
        <input type="button" id="btnSave" value="提交订单" />
    </div>

</form>

